namespace MediaOwl.Common.ScreenManagement
{
    public class Workitem<TParentWorkspace> : ExtendedScreen, IWorkitem<TParentWorkspace>
        where TParentWorkspace : class, IWorkspace
    {
        public Workitem()
        {
            IsHomeScreen = false;
            Order = 1000;
        }

        public bool IsHomeScreen { get; set; }

        public int Order { get; set; }

        public TParentWorkspace TypedParent
        {
            get { return Parent is TParentWorkspace ? Parent as TParentWorkspace : null; }
        }

        private string screenId;
        public string ScreenId
        {
            get { return screenId; }
            set
            {
                screenId = value;
                NotifyOfPropertyChange(() => ScreenId);
            }
        }
    }
}